import styled from 'styled-components'
import logoPic from '../../statics/logo.png'

export const HeaderWrapper = styled.div`
    position: relative;
    height: 56px;
    width: 100%;
    border-bottom: solid 1px #f0f0f0;
`
export const Logo = styled.div`
    position: absolute;
    top: 0;
    left: 0;
    height: 56px;
    width: 100px;
    background: url(${logoPic});
    background-size: contain;
`
export const Nav = styled.div`
    width: 960px;
    height: 100%;
    margin: 0 auto;
    padding-right: 50px;
    box-sizing: border-box;
`
export const NavItem = styled.div`
    line-height: 56px;
    padding:0 15px;
    color: #333;
    &.left{
    float: left;
    }
    &.right{
    float: right;
    }
    &.active{
    color: #ea6f5a;
    color: #969696
    }
    &.cursor{
    cursor: pointer;
    }
`
export const SearchWrapper = styled.div`
    float: left;
    position: relative;
    .zoom{
      width: 32px;
      height: 32px;
      border-radius: 16px;
      line-height: 32px;
      text-align: center;
      position: absolute;
      right: 2px;
      bottom: 3px;
      &.focused{
          background: #969696;
          color: white;
      }
    }
`
export const NavSearch = styled.input.attrs({
    placeholder: '搜索'
})`
    height: 38px;
    width: 240px;
    border: none;
    outline: none;
    border-radius: 19px;
    margin-top: 9px;
    background: #eee;
    padding: 0 20px 0;
    box-sizing: border-box;
    font-size: 14px;
    &::placeholder{
        color: #999;
    }
    &.focus-enter{
        width: 240px;
    }
    &.focus-enter-active{
        width: 320px;
        transition:all 1s ease;
    }
    &.focus-enter-done{
        width: 320px;
    }
    &.focus-exit{
        width: 320px;
    }
    &.focus-exit-active{
        width: 240px;
        transition: all 1s ease;
    }
    &.focus-exit-done{
        width: 240px;
    }
`
export const HotSearch = styled.div`
    position:absolute;
    left: 0;
    top: 58px;
    width: 240px;
    //height: 200px;
    padding: 0 20px;
    box-shadow: 0 0 8px rgba(0,0,0,.2);
    background: white;
`
export const SearchTitle = styled.div`
    margin: 15px 0 10px;
    line-height: 20px;
    font-size: 14px;
    color: #969696
`
export const SearchChange = styled.div`
    cursor: pointer;
    width: 100px;
    float:right;
    text-align: right;
    font-size: 12px;
    .spin{
        display: block;
        float: right;
        margin-left: 4px;
        font-size: 12px;
        transition: all 0.2s ease-in;
        transform: rotate(0 deg);
        transform-origin: center center;
    }
`
export const SearchItem = styled.a`
    display: block;
    float: left;
    line-height: 14px;
    height: 14px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 15px;
    padding: 2px 6px;
    border: solid 1px #ddd;
    border-radius: 3px;
    color: #969696

`
export const Addition = styled.div`
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
`
export const Button = styled.button`
    height: 38px;
    line-height: 38px;
    margin-top: 9px;
    border-radius: 19px;
    padding: 0 20px;
    box-sizing: border-box;
    border: solid 1px #EC6149;
    margin-right: 15px;
    font-size: 15px;
    &.reg{
      color: #EC6149;
      background: #fff;
    }
    &.write{
      color: #fff;
      background: #EC6149;
    }
`
